package com.itheima.api;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Objects;

public class Demo04 {
    public static void main(String[] args) {
        //Bigdecimal
      //  BigDecimal bd1 = new BigDecimal(10.0);
        BigDecimal bd2 = new BigDecimal("10.0");
        BigDecimal bd3 = new BigDecimal("3.0");
//        System.out.println(bd2.divide(bd3));
        System.out.println(bd2.divide(bd3, 4, RoundingMode.HALF_UP));
        System.out.println(bd2.divide(bd3, 4, BigDecimal.ROUND_UP));
        System.out.println(bd2.divide(bd3, 4, BigDecimal.ROUND_FLOOR));

    }
}
